﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FoundationLib.Ifc.Data
{
	/// <summary>
	/// An abstract superclass for data access object implementations.
	/// </summary>
	public abstract class DataAccessObject : IDataAccessObject
	{
		private ISessionManager sessionManager;

		/// <see cref="IDataAccessObject.SessionManager"/>
		public ISessionManager SessionManager
		{
			get { return this.sessionManager; }
		}

		/// <summary>
		/// Creates a new data access object.
		/// </summary>
		private DataAccessObject()
		{
		}

		/// <summary>
		/// Creates a new data access object.
		/// </summary>
		/// <param name="sessionManager">The session manager used to access data</param>
		protected DataAccessObject(ISessionManager sessionManager)
			: this()
		{
			this.sessionManager = sessionManager;
		}
	}
}
